<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 
            需求：求任意个数的最大值
         */

         function max(){
            var maxValue = arguments[0];
            for(var i = 0;i<arguments.length;i++){
                if(arguments[i]>maxValue){
                    maxValue = arguments[i];
                }
            }
            return maxValue;
         }

         console.log(max(1,4123,523,123,6,23));
    </script>
</head>
<body>
    
</body>
</html>